    package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.DataScope;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TmStudentDepartureMapper;
import com.ruoyi.system.domain.TmStudentDeparture;
import com.ruoyi.system.service.ITmStudentDepartureService;

/**
 * 学生离校Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-05
 */
@Service
public class TmStudentDepartureServiceImpl implements ITmStudentDepartureService 
{
    @Autowired
    private TmStudentDepartureMapper tmStudentDepartureMapper;

    /**
     * 查询学生离校
     * 
     * @param departureId 学生离校主键
     * @return 学生离校
     */
    @Override
    public TmStudentDeparture selectTmStudentDepartureByDepartureId(Long departureId)
    {
        return tmStudentDepartureMapper.selectTmStudentDepartureByDepartureId(departureId);
    }

    /**
     * 查询学生离校列表
     * 
     * @param tmStudentDeparture 学生离校
     * @return 学生离校
     */
    @Override
    @DataScope(deptAlias = "d", userAlias = "u")
    public List<TmStudentDeparture> selectTmStudentDepartureList(TmStudentDeparture tmStudentDeparture)
    {
        return tmStudentDepartureMapper.selectTmStudentDepartureList(tmStudentDeparture);
    }

    /**
     * 新增学生离校
     * 
     * @param tmStudentDeparture 学生离校
     * @return 结果
     */
    @Override
    public int insertTmStudentDeparture(TmStudentDeparture tmStudentDeparture)
    {
        return tmStudentDepartureMapper.insertTmStudentDeparture(tmStudentDeparture);
    }

    /**
     * 修改学生离校
     * 
     * @param tmStudentDeparture 学生离校
     * @return 结果
     */
    @Override
    public int updateTmStudentDeparture(TmStudentDeparture tmStudentDeparture)
    {
        return tmStudentDepartureMapper.updateTmStudentDeparture(tmStudentDeparture);
    }

    /**
     * 批量删除学生离校
     * 
     * @param departureIds 需要删除的学生离校主键
     * @return 结果
     */
    @Override
    public int deleteTmStudentDepartureByDepartureIds(Long[] departureIds)
    {
        return tmStudentDepartureMapper.deleteTmStudentDepartureByDepartureIds(departureIds);
    }

    /**
     * 删除学生离校信息
     * 
     * @param departureId 学生离校主键
     * @return 结果
     */
    @Override
    public int deleteTmStudentDepartureByDepartureId(Long departureId)
    {
        return tmStudentDepartureMapper.deleteTmStudentDepartureByDepartureId(departureId);
    }
}
